package entity

type User struct {
	UserName       string   `gorm:"column=user_name" json:"userName"`
	Account        string   `gorm:"primaryKey;column=account" json:"account"`
	Password       string   `gorm:"column=password" json:"password"`
	RoleId         int      `gorm:"column=role_id" json:"roleId"`
	State          int      `gorm:"column=state" json:"state"`
	ProfilePicture string   `gorm:"column=profile_picture" json:"profilePicture"`
	RegisterTime   int64    `gorm:"column=register_time" json:"registerTime"`
	Number         int      `gorm:"column=number" json:"number"`
	MaxNumber      int      `gorm:"column=max_number" json:"maxNumber"`
	Token          string   `gorm:"-" json:"token"`
	Role           *Role    `gorm:"-" json:"role,omitempty"` //gorm:"-" 忽略该属性
	RouterNames    []string `gorm:"-" json:"routerNames"`
}

func (u User) TableName() string {

	return "user"
}
